package yapl.symbolChecker;
import yapl.interfaces.SymbolInterface;
import yapl.typeChecker.Type;

public class Symbol implements SymbolInterface {

	private String name;
	private int kind;	
	private Type type;	
	
	public Symbol(int kind) {
		this.kind = kind;
	}
	public Symbol(String name, int kind) {
		this.name = name;
		this.kind = kind;
	}
	public Symbol(String name, int kind, Type type) {
		this.name = name;
		this.kind = kind;
		this.type = type;		
	}	
	
	@Override
	public int getKind() {		
		return this.kind;
	}

	@Override
	public String getKindString() {
		if (kind==1) return "program";
		else if(kind==2) return "procedure";
		else if(kind==3) return "variable";
		else if(kind==4) return "constant";
		else if(kind==5) return "typename";
		else if(kind==6) return "field";
		else{ return "parameter";}		
	}
	
	

	@Override
	public void setKind(int kind) {
		this.kind = kind;		
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public Type getType() {
		return this.type;
	}

	@Override
	public void setType(Type type) {
		this.type = type;
		
	}

	@Override
	public boolean isReference() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void setReference(boolean isReference) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean isGlobal() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void setGlobal(boolean isGlobal) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public int getOffset() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void setOffset(int offset) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Symbol getNextSymbol() {
		// TODO Auto-generated method stub
		return null;
	}
	

	@Override
	public boolean getReturnSeen() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void setReturnSeen(boolean seen) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void setNextSymbol(Symbol symbol) {
		// TODO Auto-generated method stub
		
	}	

}
